package com.kykj.kykj.dao;

import com.kykj.kykj.entity.RouteViewEntity;
import com.kykj.kykj.entity.UserEntity;
import com.kykj.kykj.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao {
    List<UserEntity> getUserList();

    int addUser(@Param("userVo")UserVo userVo);
    int upUser(@Param("userVo")UserVo userVo);
    int delUser(@Param("uid") int uid);
    List<UserEntity> getUserByPage(
            @Param("uname") String uname,
            @Param("start") int start,
            @Param("limit") int limit
            );//获取所有用户列表
    int getUserCount();//获取用户总数
    UserEntity doLogin(@Param("uname") String uname,@Param("upwd") String upwd);//登录
    List<RouteViewEntity> getUserRoute(@Param("uname") String uname);//获取当前用户的所有列表
    int delUserDetail(@Param("uid") int uid);//删除用户详情
    int addUserDetail(@Param("uid") int uid);//添加用户详情
    int upAvatar(@Param("avatar")String avatar,@Param("uid") int uid);//修改用户头像
}
